// 管理员登录接口
const express = require('express');
const router = express.Router();
const db = require('../../db/connect');
const xzid = require('xzid')

router.get('/student/OrderCost', (req, res) => {
    const {id} = req.query;
    console.log(req.query)
    const sql = `select * from manger_cost where cost_room_id = ?`;
    db(sql,[id] ,(err, data) => {
        if (data.length>0) {
           res.send({
                data,
                code:200
           })
        } else {
            res.send({
                code: 400,
                content: err,
                message: '获取失败'
            })
        }
    })
})
module.exports = router